import Vue from 'vue'
import App from './App.vue'
// 一级
import rout from './components/router.vue'
import contacts from './components/contacts.vue'
import about from './components/about.vue'
// 二级
import contacts21 from './components/view/第二路由/contacts2-1.vue'
import contacts22 from './components/view/第二路由/contacts2-2.vue'
import contacts23 from './components/view/第二路由/contacts2-3.vue'
// 三级
import blog from './components/view/第二路由/第三路由/blog.vue'
import fax from './components/view/第二路由/第三路由/fax.vue'

import VueRouter from 'vue-router'
Vue.use(VueRouter)
Vue.config.productionTip = false
const routes = [{
    path: "/router",
    component: rout
}, {
    path: "/contacts",
    component: contacts,
    // 二级

    children: [{
        path: "contacts21",
        component: contacts21,
    }, {
        path: "contacts22",
        component: contacts22,
    }, {
        path: "contacts23",
        component: contacts23,
        children: [{
                path: "blog",
                component: blog,
            },
            {
                path: "fax",
                component: fax,
            },
        ]
    }]
}, {
    path: "/about",
    component: about
}]
const router = new VueRouter({
    routes
})
new Vue({
    router,
    render: h => h(App),
}).$mount('#app')